﻿
using System;
using Geotools.Geometries;
namespace AzukiMap.DataSource
{
    public abstract class RasterSource : DataSource
    {
        protected double _width;
        protected double _height;
        protected int _dpi;
        protected GTEnvelope _bbox;
        protected RasterImageFormat _format;
        protected Uri _rasterSourceUri;

        public GTEnvelope Bbox
        {
            get { return _bbox; }
            set { _bbox = value; }
        }

        public double Width
        {
            get { return _width; }
            set { _width = value; }
        }

        public double Height
        {
            get { return _height; }
            set { _height = value; }
        }

        public RasterImageFormat Format
        {
            get { return _format; }
            set { _format = value; }
        }

        public int Dpi
        {
            get { return _dpi; }
            set { _dpi = value; }
        }

        public virtual Uri ImageUri
        {
            get { return _rasterSourceUri; }
        }

        public RasterSource(string name, DataSourceTypes type, int srid, CoordinationUnits coordUnit)
            : base(name, type, srid, coordUnit)
        {
            _dpi = 72;
        }
    }

    /// <summary>
    /// Silverlight supports PNG and JPEG only.
    /// </summary>
    public enum RasterImageFormat
    {
        PNG,
        JPEG,
    }

}
